.workFlowContainer {
  display: flex;
  gap: 24px;
  width: 100%;
  @keyframes slideInFromLeft {
    from {
      opacity: 0;
      transform: translateX(-100%);
      overflow: hidden;
      min-width: 0;
      width: 0;
    }
    to {
      opacity: 1;
      transform: translateX(0);
      width: 312px;
      min-width: 256px;
    }
  }

  @keyframes slideOutToLeft {
    from {
      opacity: 1;
      transform: translateX(0);
      width: 312px;
      min-width: 256px;
    }
    to {
      opacity: 0;
      transform: translateX(-100%);
      min-width: 0;
      overflow: hidden;
      width: 0;
    }
  }

  .transition-fade-enter-active {
    animation: slideInFromLeft 0.2s ease-out;
  }

  .transition-fade-leave-active {
    animation: slideOutToLeft 0.2s ease-in;
  }

  .aside-wrapper {
    position: relative;
    height: 100%;
    // 因为圆弧斜线难以绘制，这里使用背景图标代替css绘制
    .trapezoid {
      width: 16px;
      height: 56px;
      z-index: 100;
      position: absolute;
      left: 100%;
      top: 50%;
      background: var(--expand-fold-default);
      background-repeat: no-repeat;
      overflow: hidden;
      cursor: pointer;
      &:hover {
        background: var(--expand-fold-hover);
      }
      &:active {
        background: var(--expand-fold-active);
      }
    }
    .trapezoid.isExpandIcon {
      left: calc(100% - 8px);
    }
  }

  .copilot-aside {
    width: 312px;
    min-width: 256px;
    background-color: var(--o-bg-color-base);
    padding: 24px 4px 24px 24px;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    height: 100%;
  }

  .apiCenterBox {
    height: 100%;
    display: flex;
    min-width: 264px;
    flex-direction: column;
    .apiCenterTitle {
      color: var(--o-text-color-primary);
      font-size: 16px;
      font-weight: 700;
      line-height: 24px;
    }
    .apiCenterSearch {
      margin: 8px 0;
      .o-style-search {
        width: 264px;
        .el-input__wrapper {
          border-color: var(--o-border-color-lighter);
          border-radius: 4px;
        }
        .el-input__suffix::after {
          margin-top: 7px;
        }
      }
    }

    .apiContanter {
      flex: 1;
      overflow: auto;
      .el-collapse {
        .el-collapse-item__header {
          padding: 0 !important;
          height: 24px;
          line-height: 24px;
          font-size: 14px;
          color: var(--o-text-color-primary);
          display: flex;
          gap: 8px;
          text-align: left;
          flex-wrap: nowrap;
          margin-bottom: 8px;
          .el-icon {
            color: var(--o-text-color-tertiary);
          }
        }
        .el-collapse-item__content {
          margin-left: 0px;
          margin-bottom: 0px;
        }
        .el-collapse-item__arrow {
          &.is-active {
            transform: rotate(90deg);
            padding: 0px;
          }
        }
      }
    }
  }

  .workFlowContainerRight {
    flex: 1;
    // min-width: 1292px;
    background-color: var(--flow-canvas-bg);
    border-radius: 8px;
  }

  .stancesItem {
    width: 264px;
    height: 40px;
    line-height: 40px;
    background-color: var(--o-bash-bg);
    color: var(--o-text-color-primary);
    margin-bottom: 8px;
    padding-left: 16px;
    border-radius: 4px;
    display: flex;
    gap: 8px;
    align-items: center;
    .stancesName {
      width: 100%;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      display: flex;
      align-items: center;
      .nodeIcon {
        width: 24px;
        height: 24px;
        border-radius: 4px;
        line-height: 40px;
        margin-right: 12px;
      }
    }
    &:hover {
      background-color: var(--flow-bg-color);
      box-shadow: var(--o-bash-box-shadow);
      cursor: pointer;
    }
  }
  .workFlowContainerRight {
    position: relative;
    .workFlowOps {
      position: absolute;
      left: 24px;
      top: 24px;
      display: flex;
      gap: 8px;
      .workFlowSelect {
        display: block;
        width: 144px;
        height: 32px;
        border-radius: 4px;
        background-color: var(--o-bg-color-base);
        .el-select {
          width: 144px;
          height: 32px;
          .el-select__wrapper {
            background-color: var(--o-select-bg-color) !important;
            border-radius: 4px;
            .el-select__placeholder {
              color: var(--o-select-color) !important;
            }
          }
        }
      }
      .debugBtn {
        width: 32px;
        height: 32px;
        background: var(--flow-debug-default);
        border-radius: 4px;
        cursor: pointer;
        &:hover {
          background: var(--flow-debug-hover);
        }
        &:active {
          background: var(--flow-debug-active);
        }
      }
      .debugBtn.isDebugDis {
        background: var(--flow-debug-dis);
      }
    }
    .noWorkFlow {
      position: absolute;
      width: 320px;
      height: 202px;
      top: calc(50% - 101px);
      left: calc(50% - 160px);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0px;
      .noFlow {
        height: 130px;
        width: 100%;
        background-image: var(--no-work-flow);
        background-size: 100% 100%;
        line-height: 130px;
      }
      .noFlowDesc {
        width: 100%;
        height: 16px;
        margin-top: 8px;
        margin-bottom: 16px;
        text-align: center;
        color: var(--o-text-color-secondary);
      }
    }
  }

  .vueFlowContainer {
    width: 100%;
    height: 100%;
    .my-diagram-class {
      flex: 1 !important;
    }
  }
  .vue-flow__minimap {
    transform-origin: bottom right;
    background-color: var(--o-bg-color-base);
    bottom: 57px;
    margin-left: 24px;
    border-radius: 8px;
    width: 144px;
    height: 96px;
    svg {
      width: 144px;
      height: 96px;
      border-radius: 8px;
      path {
        padding: 10px;
        height: 96px !important;
      }
    }
  }

  .vue-flow__panel.right {
    right: unset;
    left: 0;
  }
}

.addWorkFlow {
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--o-text-color-secondary);
  .el-icon {
    color: var(--o-text-color-tertiary);
  }
  span{
    min-width: auto !important;
  }
}

.workFlowOption {
  display: flex;
  align-items: center;
  gap: 4px;
  .flowName {
    flex: 1;
  }
  .dealIcon {
    display: inline-block;
    width: 16px;
    line-height: 20px;
    height: 16px;
    flex: right;
  }
  .editIcon {
    background: url('@/assets/svgs/light_editor.svg');
  }
  .delIcon {
    background: url('@/assets/svgs/light_delete.svg');
  }
}
.workFlowOption.is-selected,
.workFlowOption.is-hovering {
  .editIcon {
    background: url('@/assets/svgs/dark_editor_active.svg');
  }
  .delIcon {
    background: url('@/assets/svgs/dark_delete_active.svg');
  }
}
// 各节点的状态样式提取
.vue-flow__node {
  min-width: 200px;
  padding: 0px;
  margin-top: 0px;
  .customNodeStyle {
    width: 320px;
    height: fit-content;
    border-radius: 4px;
    background: var(--el-bg-color);
    border: 2px solid transparent;
    position: relative;
    border-radius: 10px;
    background-clip: padding-box;
    .nodeBox {
      min-height: 80px;
      padding: 16px;
      display: flex;
      background: var(--flow-system-bg);
      flex-direction: column;
      gap: 8px;
      border-radius: 8px;
      .title {
        display: flex;
        height: 24px;
        font-size: 16px;
        color: var(--o-text-color-primary);
        border: 2px solid transparent;
        align-items: center;
        gap: 8px;
        .iconStyle {
          width: 24px;
          height: 24px;
          background: linear-gradient(
            120deg,
            rgba(109, 117, 250, 0.15),
            rgba(90, 179, 255, 0.15)
          );
        }
        .warnTiangleIcon {
          font-size: 20px;
        }
        .warnTiangleIcon svg path {
          &:first-child {
            fill: red;
          }
        }
        .iconLabel {
          display: flex;
          gap: 8px;
          align-items: center;
        }
        .label {
          max-width: 64px !important;
          flex: 1;
          height: 24px;
          line-height: 24px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
        .moreTip {
          margin-left: auto;
          width: 24px;
          height: 24px;
          display: flex;
          align-items: center;
          .moreDots {
            width: 16px;
            height: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            .nodeDot {
              width: 2px;
              height: 2px;
              border-radius: 50%;
              background-color: #8d98aa;
            }
          }
          &:hover {
            color: #6395fd;
          }
        }
        .notAllow {
          cursor: not-allowed;
        }
      }
      .desc {
        font-size: 12px;
        color: var(--o-text-color-tertiary);
      }
      .descSign {
        color: red !important;
        font-weight: 600 !important;
      }
      .branchDesc {
        font-size: 12px;
      }
    }
    .nodeBox.otherNode {
      background: var(--flow-other-node-bg);
    }
    .nodeBox.aposNode {
      background: var(--flow-apos-apollo-bg);
    }
    .vue-flow__handle-right {
      top: 50%;
      right: 0;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--el-bg-color);
      display: flex;
      justify-content: center;
      border: none;
      z-index: 2;
      align-items: center;
      &::after {
        display: block;
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #c3cedf;
      }
    }
    .vue-flow__handle-left {
      top: 50%;
      left: 0;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--el-bg-color);
      display: flex;
      justify-content: center;
      align-items: center;
      border: none;
      z-index: 2;
      &::after {
        display: block;
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #c3cedf;
      }
    }
    // 选中样式
    .select {
      border: 2px solid #6395fd;
    }
    // 悬浮样式
    &:hover {
      border: 2px solid #6395fd;
      .vue-flow__handle {
        width: 12px;
        height: 12px;
        &::after {
          width: 10px;
          height: 10px;
          background: #6395fd;
        }
      }
      // 下面这两个样式是因为悬浮时，设计图的边框有2px，需要平移1px以保持居中
      .vue-flow__handle-left {
        left: -1px;
      }
      .vue-flow__handle-right {
        right: -1px;
      }
    }
  }
  .customNodeStyle.success {
    border: 2px solid #24ab36;
    .vue-flow__handle-left {
      &::after {
        background: #24ab36;
      }
    }
    .vue-flow__handle-right {
      &::after {
        background: #24ab36;
      }
    }
  }
  .customNodeStyle.error {
    border: 2px solid #e32020;
    .vue-flow__handle-left {
      &::after {
        background: #e32020;
      }
    }
    .vue-flow__handle-right {
      &::after {
        background: #e32020;
      }
    }
  }
  .nodeIdShow {
    display: flex;
    align-items: center;
    gap: 8px;
    .nodeIdText {
      font-size: 12px;
      flex: 1;
      color: #575d6c;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .copydocument {
      cursor: pointer;
      transform: rotateZ(180deg);
    }
    .copydocument:hover {
      color: #0077ff;
    }
  }
  .vue-flow__handle.isConnecting {
    width: 12px;
    height: 12px;
    &::after {
      width: 10px;
      height: 10px;
      background: #6395fd;
    }
  }
  .vue-flow__handle-left.isConnecting {
    left: -1px;
  }
  .vue-flow__handle-right.isConnecting {
    right: -1px;
  }
}
.nodeDealPopper {
  width: 64px !important;
  min-width: 64px !important;
  height: 72px;
  padding: 4px 0px !important;
  border-radius: 4px;
  .el-popper__arrow {
    display: none;
  }
  .dealItem {
    display: block;
    width: 100%;
    height: 32px;
    line-height: 32px;
    text-align: center;
    margin-left: 0px;
    color: var(--o-text-color-secondary);
    &:hover {
      span {
        color: var(--o-color-white) !important;
      }
      background-color: var(--o-color-primary-secondary) !important;
    }
  }
  &:hover {
    border: 1px solid var(--o-color-primary-secondary) !important;
  }
}
